﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
<title>Onbeforeunload test</title>
</head> 
<body> 
<p>This is a test of onbeforeunload. Please click this link to <a href="http://www.google.com">google.com</a></p>
<script type="text/javascript">
window.onbeforeunload = function () {
    return "Are you sure that you want to leave this page?";
}
</script>
</body> 
</html>